package com.qf.service.doctorconsultations.Impl;

import com.qf.entity.Doctorconsultations;
import com.qf.mapper.doctorconsultationsmapper.DoctorconsultationsMapper;
import com.qf.service.doctorconsultations.DoctorconsultationsService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
 * (Doctorconsultations)表服务实现类
 *
 * @author makejava
 * @since 2024-12-02 20:57:08
 */
@Service("doctorconsultationsService")
public class DoctorconsultationsServiceImpl implements DoctorconsultationsService {
    @Autowired
    private DoctorconsultationsMapper doctorconsultationsMapper;

    /**
     * 通过ID查询单条数据
     *
     * @param consultationId 主键
     * @return 实例对象
     */
    @Override
    public Doctorconsultations queryById(Integer consultationId) {
        return this.doctorconsultationsMapper.queryById(consultationId);
    }

    /**
     * 分页查询
     *
     * @return 查询结果
     */
    @Override
    public List<Doctorconsultations> queryByPage(Integer pageNum) {
        return this.doctorconsultationsMapper.queryAllByLimit();
    }

    /**
     * 新增数据
     *
     * @param doctorconsultations 实例对象
     * @return 实例对象
     */
    @Override
    public int insert(Doctorconsultations doctorconsultations) {
        return this.doctorconsultationsMapper.insert(doctorconsultations);
    }

    /**
     * 修改数据
     *
     * @param doctorconsultations 实例对象
     * @return 实例对象
     */
    @Override
    public int update(Doctorconsultations doctorconsultations) {
        return this.doctorconsultationsMapper.update(doctorconsultations);
    }

    /**
     * 通过主键删除数据
     *
     * @param consultationId 主键
     * @return 是否成功
     */
    @Override
    public boolean deleteById(Integer consultationId) {
        return this.doctorconsultationsMapper.deleteById(consultationId) > 0;
    }

    @Override
    public List<Doctorconsultations> list(Doctorconsultations doctorconsultations) {
        return doctorconsultationsMapper.list(doctorconsultations);
    }

    @Override
    public List<Doctorconsultations> doctorList() {
        return doctorconsultationsMapper.doctorList();
    }
}
